package day1105.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Mr.ma
 * @since 2022/11/5 14:19
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student implements Comparable<Student>{
    private int id;
    private String name;
    private String clazz;
    private int age;
    private String city;
    private Double score;

    @Override
    public int compareTo(Student s) {
        return this.getAge() - s.getAge();
    }
}